package com.yhb.controller;

import me.edzh.spring.bootstrap.annotations.NeedAuth;
import me.edzh.spring.bootstrap.model.Response;
import me.edzh.spring.bootstrap.service.ObjectiveStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/upload")
public class UploadController {

    @Autowired
    private ObjectiveStorageService ossServiceImpl;


    @GetMapping("/private/token")
    @NeedAuth
    public Response<Object> getPrivateToken() {
        return new Response<>(ossServiceImpl.getToken());
    }
}
